<!--空白页面参考模版-->
{extend name="public/base" /}
{block name='content'}
{include file='public/content_header' /}
<section class="content">
    <div class="row">
        <div class="col-md-12">

            <div class="card card-primary card-outline card-outline-tabs">
                <div class="card-header p-0 border-bottom-0">
                    <ul class="nav nav-tabs NavTab" id="settingTab" role="tablist">
                        {foreach name='data_config' id='item'}
                        <li class="nav-item">
                            <a class="nav-link " href="#tab_{$key}" role="tab" aria-controls="tab_{$key}"
                               aria-selected="true" data-toggle="tab">{$item.name}</a>
                        </li>
                        {/foreach}
                    </ul>
                </div>

                <div class="card-body">
                    <div class="tab-content">
                        {foreach name='data_config' id='item'}
                        <div class="tab-pane" id="tab_{$key}" >

                            <form class="form-horizontal dataForm" action="{:url('setting/update')}" method="post"
                                  enctype="multipart/form-data">
                                <div class="card-body">
                                    <input name="id" value="{$item.id}" hidden>
                                    {foreach name='item.content' id='data' key='kk'}
                                    {$data.form|raw}
                                    {/foreach}
                                </div>

                                <!--表单底部-->
                                <div class="card-footer">
                                    <div class="row">
                                        <div class="col-sm-2">
                                        </div>

                                        <div class="col-sm-10 col-md-4 formInputDiv">

                                            <div class="btn-group">
                                                <button type="submit" class="btn btn-sm btn-primary dataFormSubmit">
                                                    保 存
                                                </button>
                                            </div>
                                            <div class="btn-group">
                                                <button type="reset" class="btn btn-sm btn-default dataFormReset">
                                                    重 置
                                                </button>
                                            </div>

                                        </div>
                                    </div>
                                </div>
                            </form>
                        </div>
                        {/foreach}
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>

<script>
    $.each($('.dataForm'), function (index, item) {
        $(item).validate({});
    })
</script>

{/block}